import Data from "../object/Data"
import PlayerOptions from "../object/PlayerOptions"
import playerConst from "../constant/player.const"

export default class PlayerOptionsData extends Data {
  options: PlayerOptions
  constructor(e: Partial<PlayerOptions> = {}) {
    super()
    this.name = "player-options"
    this.options = new PlayerOptions(e)
  }
  resetDefaultTourOptions() {
    this.options.fast_transitions = playerConst.fast_transitions
    this.options.transition_speed = playerConst.transition_speed
    this.options.transition_time = playerConst.transition_time
    this.options.pan_speed = playerConst.pan_speed
    this.options.dollhouse_pan_speed = playerConst.dollhouse_pan_speed
    this.options.zoom_duration = playerConst.zoom_duration
    this.options.pan_angle = playerConst.pan_angle
    this.options.pan_direction = playerConst.pan_direction
    this.options.commit()
  }
}
